class Documenti::RiepilogoNoteController < Documenti::NoteController
  require_role self.parent_name.underscore
  active_scaffold :nota do |config|
    ref = [ :nota_ref_type, :nota_ref ]
    columns = [ :data, :testo ]
    config.show.columns = config.list.columns = ref + columns
  end

  def controller_before_create_update_save(record)
    record.nota_ref_type = 'User'
    record.nota_ref_id = current_user.id
  end
end
